/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.springvision.yuanfeng.device.entity;

import com.springvision.yuanfeng.locale.entity.DevStation;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;

/**
 * 设备Entity
 * @author ycb
 * @version 2018-07-20
 */
public class Device extends DataEntity<Device> {

	private static final long serialVersionUID = 1L;

	private String name; // 设备名称

	private String code; // 设备编码

	private String online ="1"; // 是否在线

	private DevStation devStation; // 所属场站

	private Integer xpoint = 0; // X坐标

	private Integer ypoint = 0; // Y坐标

	public Device() {
		super();
		this.setIdType(IDTYPE_AUTO);
	}

	public Device(String id) {
		super(id);
	}

	@ExcelField(title = "设备名称", align = 2, sort = 7)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ExcelField(title = "设备编码", align = 2, sort = 8)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@ExcelField(title = "是否在线", align = 2, sort = 9)
	public String getOnline() {
		return online;
	}

	public void setOnline(String online) {
		this.online = online;
	}

	@ExcelField(title = "所属场站", fieldType = DevStation.class, value = "devStation.name", align = 2, sort = 10)
	public DevStation getDevStation() {
		return devStation;
	}

	public void setDevStation(DevStation devStation) {
		this.devStation = devStation;
	}

	@ExcelField(title = "X坐标", align = 2, sort = 11)
	public Integer getXpoint() {
		return xpoint;
	}

	public void setXpoint(Integer xpoint) {
		this.xpoint = xpoint;
	}

	@ExcelField(title = "Y坐标", align = 2, sort = 12)
	public Integer getYpoint() {
		return ypoint;
	}

	public void setYpoint(Integer ypoint) {
		this.ypoint = ypoint;
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see java.lang.Object#toString()
	 * @author: Elvin Zhao - 279152260@qq.com 
	 * @date: Created on 2018年7月24日 下午2:38:22
	 */
	@Override
	public String toString() {
		return "Device [name=" + name + ", code=" + code + ", online=" + online + ", devStation=" + devStation
				+ ", xpoint=" + xpoint + ", ypoint=" + ypoint + "]";
	}

}